<template>
	<view class="goods_list">
		<view class="goods_item"  v-for="(item,index) in goods" :key="item.id" @click="navigator(item.id)">
			<image src="https://img3m1.ddimg.cn/72/11/11029465431-1_e_3.jpg"></image>
			<view class="name">{{item.title}}</view>
			<view class="info">
				<view class="left_price">￥</view>
				<view class="middle_price">{{item.sell_price}}</view>
				<view class="right_price">.00</view>
			 </view>
		</view>
	</view>
</template>

<script>
	export default{
		props:['goods'],
		methods:{
			navigator(id){
				this.$emit("goodsItemClick",id)
			}
		}
	}
</script>

<style>
	.goods_list{
		padding:0 15rpx;
		display:flex;
		flex-wrap:wrap;
		justify-content:space-between;
	}
	.goods_item{
		background:#fff;
		width:350rpx;
		margin:5rpx auto;
	}
	.goods_item .name{
		width:90%;
		font-size:28rpx;
		color:#333;
		text-overflow:ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow:hidden;
	}
	.goods_item image{
		width:350rpx;
		height:355rpx;
	}
	.info{
		display:flex;
		flex-direction:row;
	}
	.info view{
		display:flex;
		font-size:36rpx;
		color:#b50e03;
		padding:5rpx 0;
	}
</style>